package com.itheima.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.UserDao;
import com.itheima.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import service.UserService;
@Service(interfaceClass = UserService.class)
@Transactional
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    //查询数据库用户 用户具有的角色 角色具有的权限
    public User findByUserName(String username) {
        User user = userDao.findByUserName(username);
        if (user!=null){
            return user;
        }
       return null;
    }
}
